import request from './request.js'
// const API = 'http://new_mkmh.test/api/';
const API = request.url
const api = {
	common: {
		upload: (data) => request.post(API + 'common/upload', data),
		sendCode: (data) => request.get(API + 'common/sendCode', data),
	},
	index: {
		
		challengeBox: (data) => request.get(API + 'challengeBox', data),//擂台列表
		usersDraw_down: (data) => request.post(API + 'users/draw_down', data),//擂台列表
		// barrage: (id, data) => request.get(API + `blindBox/barrage/${id}`, data),
		challengeBoxDetail: (id,data) => request.get(API + `challengeBox/${id}`,data),//擂台详情
		challengeBoxTypes: (data) => request.get(API + 'challengeBoxTypes', data),//擂台tabs选项卡列表
		challengeBoxConfirmPaymentPage:(data) => request.post(API + 'challengeBox/confirmPaymentPage',data) , //擂台判断是否额外支付
		challengeBoxDraw_one:(data) => request.post(API + 'challengeBox/draw_one',data) , //抽奖接口
		challengeBoxDraw_six:(data) => request.post(API + 'challengeBox/draw_six',data) , //多随机抽奖接口
		draw_box:(data) => request.post(API + 'challengeBox/draw_box',data) , //box开奖
		draw_eight:(data) => request.post(API + 'challengeBox/draw_eight',data) , //小闯关开奖接口
		draw_seven:(data) => request.post(API + 'challengeBox/draw_seven',data) , //全局上开奖接口
		boxOrderPrizesOpenTreasure:(data) => request.post(API + 'boxOrderPrizes/openTreasure',data) , //赏袋盒子开启
		boxOrderPrizesLock:(data) => request.post(API + 'boxOrderPrizes/lock',data) , //移入移出保险柜
		challengeBoxPrizesExchangeBoxs:(data) => request.get(API + 'challengeBoxPrizes/exchangeBoxs',data) , ////换箱列表
		challengeBoxPrizesGetBoxs:(data) => request.get(API + 'challengeBoxPrizes/getBoxs',data) , //选择箱字
		challengeBoxOrderPrizesWinnerRecord:(data) => request.get(API + 'challengeBoxOrderPrizes/winnerRecord',data) , //打拳抽奖记录
	},
	
	share:{
		
		usersGetWxCode: (data) => request.post(API + 'users/getWxCode', data),//擂台列表
	},
	/*settings:{
	  show:(data) => request.post(API+`settings`,data),
	},*/
	// 版本
	versions: {
		check: (data) => request.get(API + `versions/check`, data),
	},
	// 消息
	messages: {
		index: (data) => request.get(API + `messages`, data),
		readOne: (id, data) => request.post(API + `messages/${id}`, data),
		readAll: (data) => request.post(API + `messages/readAll`, data),
	},
	// 盲盒
	blindBox: {
		index: (data) => request.get(API + `blindBox`, data),
		show: (id, data) => request.get(API + `blindBox/${id}`, data),
		barrage: (id, data) => request.get(API + `blindBox/barrage/${id}`, data),
		draw: (data) => request.post(API + `blindBox/draw`, data), // 抽奖
		priceSpread: (data) => request.post(API + `blindBox/priceSpread`, data), // 价格差距
		luckTurntables: (data) => request.get(API + `luckTurntables`, data), //转盘
		luckTurntables_raw: (data) => request.post(API + `luckTurntables/draw`, data), //转盘抽奖
		luckTurntablesRecords: (data) => request.get(API + `luckTurntables/records`, data), //转盘抽奖记录

	},
	// 开盒流水
	blindBoxOrders: {
		show: (id, data) => request.get(API + `blindBoxOrders/${id}`, data),
		blindBoxOrderPrizesD_show: (id, data) => request.get(API + `blindBoxOrders/d_show/${id}`, data),//叠加抽奖结果数据
		index: (data) => request.get(API + `blindBoxOrders`, data),
	},
	// 赠礼记录
	blindBoxGiveOrders: {
		index: (data) => request.get(API + `blindBoxGiveOrders`, data),
	},
	// 弹窗
	pops: {
		index: (data) => request.get(API + `pops`, data),
	},
	// 赏袋
	blindBoxOrderPrizes: {
		index: (data) => request.get(API + `boxOrderPrizes`, data), // 赏袋
		show: (id, data) => request.get(API + `boxOrderPrizes/${id}`, data), // 赏袋
		takeShow: (data) => request.get(API + `boxOrderPrizes/takeShow`, data), // 赏袋提货列表
		exchangeShow: (data) => request.get(API + `boxOrderPrizes/exchangeShow`, data), // 赏袋拒提列表
		giveShow: (data) => request.get(API + `boxOrderPrizes/giveShow`, data), // 赏袋赠送列表
		give: (data) => request.post(API + `boxOrderPrizes/give`, data), // 赏袋赠送
		exchange: (data) => request.post(API + `boxOrderPrizes/exchange`, data), // 赏袋拒提
		order: (data) => request.get(API + `boxOrderPrizes/order`, data), // 赏袋拒提确认订单
		back: (id, data) => request.post(API + `boxOrderPrizes/back/${id}`, data), // 赏袋反悔
	},
	// 订单
	orders: {
		index: (data) => request.get(API + `orders`, data), // 提货订单
		show: (id, data) => request.get(API + `orders/${id}`, data), // 提货订单
		cancel: (id, data) => request.put(API + `orders/cancel/${id}`, data), // 提货订单
		receive: (id, data) => request.put(API + `orders/receive/${id}`, data), // 提货订单
		express: (id, data) => request.get(API + `orders/express/${id}`, data), // 提货订单
		edit: (id, data) => request.put(API + `orders/${id}`, data), // 提货订单
		del: (id, data) => request.del(API + `orders/${id}`, data), // 提货订单
		store: (data) => request.post(API + `orders`, data), // 提货订单
		count: (data) => request.get(API + `orders/count`, data), // 订单
	},
	// 虎元素账单
	balanceLogs: {
		index: (data) => request.get(API + `balanceLogs`, data), // 账户
	},
	// 充值面板
	rechargePanels: {
		index: (data) => request.get(API + `rechargePanels`, data), // 充值面板
	},
	// 虎币账单
	pointLogs: {
		index: (data) => request.get(API + `pointLogs`, data), // 账户
	},
	// 商品
	goods: {
		index: (data) => request.get(API + 'goods', data), // 商品列表
		show: (id, data) => request.get(API + `goods/${id}`, data), // 商品详情
		//show:(id,data) => request.get('http://192.168.1.7/api/goods/27',data), // 商品详情
		order: (data) => request.get(API + `goods/order`, data), // 从商品生成订单页数据
		rh: (data) => request.get(API + `fusionPrizes`, data), //融合
	},
	goodsCates: {
		index: (data) => request.get(API + 'goodsCates', data), // 商品分类列表
	},
	questionCate: {
		index: (data) => request.get(API + 'questionCates', data), // 问题分类
	},
	/*questions:{
	  index:(data) => request.get(API+'questions',data), 			// 问题分类
	  show:(id,data) => request.get(API+`questions/${id}`,data), // 问题详情
	},*/
	users: {
		login: (data) => request.post(API + 'users/login', data),
		usersMini_login: (data) => request.post(API + 'users/mini_login', data), //小程序微信登录
		usersHide_wx_login: (data) => request.get(API + 'users/hide_wx_login', data), //显示登录方式
		logout: (data) => request.post(API + 'users/logout', data),
		update: (data) => request.put(API + 'users', data), // 登录
		tasks: (data) => request.get(API + 'tasks', data),//任务周日
		taskss: (id) => request.post(API + `tasks/${id}`),//任务周日领取奖励
		show: (data) => request.get(API + 'users', data), // 用户信息
		usersGetMobile: (data) => request.post(API + `users/getMobile`,data),  //获取手机号
		search: (id, data) => request.get(API + `users/${id}`, data), // 搜索用户信息
		bind: (data) => request.post(API + 'users/bind', data),
		off: (data) => request.post(API + 'users/off', data), // 注销
		settings:(data) => request.get(API + 'settings',data),//设置
		streamRanks:(data) => request.get(API + 'streamRanks',data),//流水排行
		luckDraws:(data) => request.get(API + 'luckDraws',data),//福利抽选
		luckDrawsShow:(id) => request.get(API + `luckDraws/show/${id}`),//福利抽选
		luckDrawsDraw:(data) => request.post(API + `luckDraws/draw`,data),//福利抽选
		luckDrawsMyDrawCode:(data) => request.get(API + `luckDraws/myDrawCode`,data),//福利抽选
		luckDrawsDraw_zj_all:(data) => request.get(API + `luckDraws/draw_zj_all`,data),//福利抽选
		luckDrawsRecords:(data) => request.get(API + `luckDraws/records`,data),//福利抽选
		
		// luckDrawsDraw: 'luckDraws/draw',//加入福利抽奖
		// luckDrawsMyDrawCode: 'luckDraws/myDrawCode',//我的随机码
		// luckDrawsDraw_cy_all: 'luckDraws/draw_cy_all',//福利参与人员
		// luckDrawsDraw_zj_all: 'luckDraws/draw_zj_all',//福利中奖人员
		// luckDrawsRecords: 'luckDraws/records',//幸运物我的参与记录
		
	},
	// 收货地址
	userAddress: {
		index: (data) => request.get(API + 'userAddress', data), // 收货地址列表
		default: (data) => request.get(API + 'userAddress/default', data), // 收货地址
		show: (id, data) => request.get(API + `userAddress/${id}`, data), // 收货地址列表详情
		edit: (id, data) => request.put(API + `userAddress/${id}`, data), // 收货地址列表详情
		store: (data) => request.post(API + `userAddress`, data), // 收货地址列表详情
		del: (id, data) => request.del(API + `userAddress/${id}`, data), // 收货地址列表详情
		freight: (id, data) => request.get(API + `userAddress/freight/${id}`, data), // 根据地址判断运费
	},
	// 轮播其
	banners: {
		index: (data) => request.get(API + 'banners', data),
	},
	// 签到面板
	signPanels: {
		index: (data) => request.get(API + 'signPanels', data),
	},
	// 提现
	cashs: {
		index: (data) => request.get(API + 'cashs', data), // 提现列表
		store: (data) => request.post(API + 'cashs', data), // 申请提现
	},
	contents: {
		show: (id, data) => request.get(API + `contents/${id}`, data), // 内容详情
	},
	settings: {
		show: (data) => request.get(API + `settings`, data), // 设置详情
	},
	// 签到
	userSigns: {
		store: (data) => request.post(API + `userSigns`, data),
	},
	// 商务合作
	cooperates: {
		store: (data) => request.post(API + `cooperates`, data),
	},
	// 意见反馈
	feedback: {
		store: (data) => request.post(API + `feedback`, data),
	},
	// 等级
	userLevels: {
		index: (data) => request.get(API + `userLevels`, data), //
	},
	//问题
	questions: {
		index: (data) => request.get(API + `questions`, data), // 问题
		list: (data) => request.get(API + `questions/list`, data), // 问题
		show: (id, data) => request.get(API + `questions/${id}`, data), // 问题
	},
	// 最近开出
	blindBoxOrderPrizeLogs: {
		index: (data) => request.get(API + `blindBoxOrderPrizeLogs`, data),
	},
	// 充值赠礼
	rechargeRewards: {
		index: (data) => request.get(API + `rechargeRewards`, data),
		reward: (data) => request.post(API + `rechargeRewards`, data),
	},
	// 用户优惠券
	userCoupons: {
		index: (data) => request.get(API + `userCoupons`, data),
		show: (data) => request.get(API + `userCoupons/show`, data),
	},
	// 推广员
	userPromotions: {
		store: (data) => request.post(API + `userPromotions`, data),
		index: (data) => request.get(API + `userPromotions`, data),
	},
	// 充值
	rechargeOrders: {
		store: (data) => request.post(API + `rechargeOrders`, data),
		getRechargeOrdersInfo: (data) => request.post(API + `getRechargeOrdersInfo`, data),
	},
	// vip签到
	userVipSigns: {
		store: (data) => request.post(API + `userVipSigns`, data),
	},
	// 每日领取优惠券
	couponPanels: {
		index: (data) => request.get(API + `couponPanels`, data),
		store: (data) => request.post(API + `couponPanels`, data),
	},
	// 每日任务
	tasks: {
		index: (data) => request.get(API + `tasks`, data),
		reward: (id, data) => request.post(API + `tasks/${id}`, data),
	},
	// 我的反悔卡
	userBackCards: {
		index: (data) => request.get(API + `userBackCards`, data),
	},
	// 我的佣金
	userCommissions: {
		index: (data) => request.get(API + `userCommissions`, data),
	},
	// 提现
	userWithdraws: {
		index: (data) => request.get(API + `userWithdraws`, data),
		store: (data) => request.post(API + `userWithdraws`, data),
	},
	// 我的邀请奖励
	userInviteRewards: {
		index: (data) => request.get(API + `userInviteRewards`, data),
		child: (data) => request.get(API + `userInviteRewards/child`, data),
	},
	// 领主
	blindBoxRanks: {
		index: (data) => request.get(API + `blindBoxRanks`, data),
	},
	//
	userLevelLogs: {
		index: (data) => request.get(API + `userLevelLogs`, data), // 历史升级降级记录
		log: (data) => request.get(API + `userLevelLogs/log`, data), // 五日流水
	},
	// 福利屋
	welfareHouses: {
		// 福利屋首页
		index: (data) => request.get(API + 'wealRooms', data),
		// 创建房间
		create: (data) => request.post(API + 'wealRooms/create', data),
		// 获取商品列表
		goods: (page) => request.get(API + 'wealRoomsGoods?page=' + page),
		// 获取房间详情
		detail: (id) => request.get(API + 'wealRooms/' + id),
		// 创建历史记录
		createHistory: (data) => request.get(API + 'wealRooms/record', data),
		// 获取参与列表
		joinList: (data) => request.get(API + 'wealRoomsParticipation/participant', data),
		// 参与房间
		join: (data) => request.post(API + 'wealRooms/participation', data),
		// 获取房间参与人数
		num: (id) => request.get(API + 'wealRoomsParticipation/' + id),
		// 中奖记录
		winning: (data) => request.get(API + 'wealRoomsOrdersPrizes/drawRecord', data),
		// 参与历史记录
		joinHistory: (data) => request.get(API + 'wealRoomsOrdersPrizes/myParticipation', data),
		// 开奖
		open: (id) => request.get(API + 'wealRooms/draw/' + id),
		// 我的抽奖奖品记录
		order: (data) => request.get(API + 'wealRoomsOrdersPrizes/myDrawRecord', data),
		// 赠送列表
		giveShow: (data) => request.get(API + 'wealRoomsOrdersPrizes/giveShow', data),
		// 赠送
		give: (data) => request.post(API + 'wealRoomsOrdersPrizes/give', data),
		// 拒提列表
		exchangeShow: (data) => request.get(API + 'wealRoomsOrdersPrizes/exchangeShow', data),
		// 拒提
		exchange: (data) => request.post(API + 'wealRoomsOrdersPrizes/exchange', data),
		// 提货列表
		takeShow: (data) => request.get(API + 'wealRoomsOrdersPrizes/takeShow', data),
		// 订单页
		take: (data) => request.get(API + 'wealRoomsOrdersPrizes/order', data),
		// 商品详情
		show: (id) => request.get(API + 'wealRoomsOrdersPrizes/' + id),
		// 提交订单
		store: (data) => request.post(API + 'orders', data),
		// 已读
		read: (id) => request.get(API + 'wealRooms/insertNum?weal_rooms_id=' + id),
	},
	// 系统通知
	notifies: {
		// 获取通知
		index: () => request.get(API + 'systemAnnouncements'),
	},
	// 红包
	redPackets: {
		// 创建红包
		create: (data) => request.post(API + 'redPackets/create', data),
		// 领取红包
		receive: (data) => request.post(API + 'redPackets/receive', data),
		// 红包列表
		index: (data) => request.get(API + 'redPackets', data),
		// 红包详情
		detail: (id) => request.get(API + 'redPackets/' + id),
		// 领取记录
		record: (data) => request.get(API + 'redPackets/records', data)
	},
	bonus: {
		fusionPrizes: (data) => request.get(API + 'fusionPrizes', data),//进阶可获得的赏品
		boxOrderPrizes: (data) => request.get(API + 'boxOrderPrizes', data),//赏袋列表
		advancePrizesStore: (data) => request.post(API + 'fusionPrizes/store', data),//赏袋列表
		// advancePrizesStore: 'fusionPrizes/store',
		// fusionPrizes: 'fusionPrizes',//进阶可获得的赏品
		// boxOrderPrizes: 'boxOrderPrizes',//赏袋列表
		// BoxOrderPrizesExchange: 'boxOrderPrizes/exchange',//赏袋拒提
		// boxOrderPrizesLock: 'boxOrderPrizes/lock',//移入保险箱
		// BoxOrderPrizesGive: 'boxOrderPrizes/give',//赠送
		// boxOrderPrizesOrder: 'boxOrderPrizes/order',//赠送
		// boxOrderPrizes: 'boxOrderPrizes',//可进阶的赏品
		// fusionPrizesAutoAdd: 'fusionPrizes/autoAdd', //自动添加进阶
		// fusionPrizesAutoAdd: 'fusionPrizes/autoAdd', //自动添加进阶
		// advancePrizesStore: 'fusionPrizes/store',
		// boxOrderPrizesTreasure: 'boxOrderPrizes/treasure',//宝箱列表
		// boxOrderPrizesLucky_bag: 'boxOrderPrizes/lucky_bag',//福袋列表
		// boxOrderPrizesOpenTreasure: 'boxOrderPrizes/openTreasure',//宝箱开启
		// boxOrderPrizesTreasure_exchange: 'boxOrderPrizes/treasure_exchange',//宝箱拒提

	},
}

export default api